package part5;

/**
 * @author wcj
 * @Date 2021/5/13 16:18
 * @Version 1.0
 */
public class Part58 {

    private boolean flag;

    private char c;

    private byte b;

    private int i;

    private long l;

    private float f;

    private double d;

    private Part58 p;

    /**
     * 类的成员变量都会默认直接进行初始化
     */
    public void printInit() {
        System.out.println("boolean=" + flag);
        System.out.println("char=" + c);
        System.out.println("byte=" + b);
        System.out.println("int=" + i);
        System.out.println("long=" + l);
        System.out.println("float=" + f);
        System.out.println("double=" + d);
        System.out.println("Part58=" + p);
    }

    public void test() {
        //方法中的局部变量必须要进行初始化操作
        int i = 0;
        System.out.println(i);
    }

    public static void main(String[] args) {
        Part58 part58 = new Part58();
        part58.printInit();
    }
}
